# 读取文件的信息，并且统计ttheima

with open('D:/python.txt', 'r', encoding="UTF-8") as f:
    # result = f.read()
    # print(result)
    # print(result.count('ttheima'))




    #按照一行一行取的方式
    count=0
    for line in f:
        line = line.strip()#删除开头结尾的空格，和换行符
        word = line.split(" ")#分割

        for i in word:
            if i=="ttheima":
                count+=1


    print(f"一共有{count}个")

